<{include file="public_html/header.html"}>
<{include file="public_html/left_menu.html"}>
    <blockquote class="layui-elem-quote"><{$action}></blockquote>

    <fieldset class="layui-elem-field">
        <legend>按条件搜索</legend>
        <div class="layui-field-box">
                <form class="layui-form layui-form-pane1" method="post" action="<{$current_url}>">
                <{assign var="pid" value=$conditions['pid']|default:"all"}>
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <input type="text" name="category[search]" placeholder="搜索内容" value="<{if $data['search']}><{$data['search']}><{/if}>" class="layui-input">
                    </div>
                    <div class="layui-inline">
                        <button type="submit" class="layui-btn">搜索</button>
                        <a class="layui-btn" href="/course/cate_subject_publish"><i class="layui-icon"></i> 添加科目</a>
                    </div>
                </div>
            </form>
        </div>
    </fieldset>
            
    <form class="layui-form layui-form-pane1" method="post" action="/video/update_sorts" delete_action="/video/delete">
        <div class="mt">
            <a href="javascript:;" class="curr">全部</a>
        </div>
        <table class="layui-table" lay-even lay-skin="row">
            <thead>
                <tr>
                    <th>ID</th>
                    <th>科目名</th>
                    <th>排序</th>
                    <th>所属分类</th>
                    <th>添加时间</th>
                    <th>状态</th>
                    <th>操作</th>
                </tr>
            </thead>   
            <tbody>
            <{foreach from=$list item=item}>
            <tr>
                <td class="not_lb tal"><{$item.id}></td>
                <td class="not_lb tal"><{$item.name}>
                </td>
                <td class="not_lb tal"><span class="c-ff6d5e"><{$item.sort}></span></td>
                <td class="not_lb tal">
                    <{$item['cate_name']}>
                </td>
                <td class="not_lb tal">
                    <{$item[ 'add_time']|date_format: '%Y-%m-%d <br> %H:%M:%S'}></td>
                <td class="not_lb tal">
                    <div class="colorBtn">
                        <p><span><{if $item.status == 1}>启用<{else}>禁用<{/if}></span></p>
                    </div>
                </td>
                <td class="not_lb tal">
                    <div class="colorBtn">
                        <p><a href="/course/edit_course_cate_subject/<{$item.id}>">编辑</a></p>
                        <p><a  href="javascript:if(confirm('确实要删除该科目吗?'))location='/course/delete_course_cate_subject/<{$item.id}>'">删除</a></p>
                    </div>
                </td>
            </tr>
            <{/foreach}>
            <{if $list|count eq 0}>
                <tr>
                    <td class="center" style=" height:120px; text-align:center;line-height:120px;" colspan="8">
                        赞无数据！
                    </td>
                </tr>
            <{/if}>
            <tr>
                <td class="center" colspan="12">
                    <!-- <input type="checkbox" lay-filter="checkbox_all" title="全选"> -->
                   <!--  <button id="delete" class="layui-btn layui-btn-primary layui-btn-small" style="margin-top:4px;"><i class="layui-icon"></i> 批量删除</button> -->
                </td>
            </tr>
            </tbody>
        </table>
    </form>
    <div class="layui-box layui-laypage layui-laypage-default">
            <{$pagination}>
        </div>
<{include file="public_html/footer.html"}>